﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SmartPatientCentre.Models
{
    class CreatinineResult : UniqueResult
    {
        public CreatinineResult(Result result, Patient patient)
        {
            ResultType = "Creatinine";
            Date = result.DateTime;
            Value = result.Creatinine.Value;

            if (patient.Gender == "Male")
            {
                if (Common.Creatinine.MaleNormalRange(Value))
                {
                    TileBackground = "#FFCDE6CD"; // Green
                }
                else
                {
                    TileBackground = "#FFFFCDCD"; // Red
                }
            }
            else
            {
                if (Common.Creatinine.FemaleNormalRange(Value))
                {
                    TileBackground = "#FFCDE6CD"; // Green
                }
                else
                {
                    TileBackground = "#FFFFCDCD"; // Red
                }
            }
        }
    }
}
